package com.example.demo.controller;


import com.example.demo.model.UserInfo;
import com.example.demo.service.UserInfoService;
import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserInfoController {

    @Autowired
    private UserInfoService userInfoService;

    @RequestMapping("/getUserInfoById")
    public UserInfo getUserInfoById(Integer id) {
        if (id == null) {
            return null;
        }
        return userInfoService.getUserInfoById(id);
    }
}
